added the ability to calculate best sequences