modify filterIllegalMoves to allow any position