refactor continuation