refactor before classification