index error fixed in best genome finding