rename push_ref to more specific name
refactor to specify nodes during state machine construction