adjustments and general state machine approach