contin refactor