State transition logic.