Offset variable

-added offset variable to subtract or add to the xA value and set the
idle state to 0