add_state_machine_for_pages