State machine stage 2