added state to avoid servo moving unncessarily