refactoring + feature matrix