refactoring + styling