finished search fucntion, move generation