only allow valid moves