continuation refactor wip