extract step to subtemplate