refactoring + TODOs