replaced setter for motor state with public variable