Chorus formation algorithm acm