basic refactor