shift capture hook from finalize! to state_machine