fixed bug in chooseMove