refactor during class