cont refactor