refactoring, formatting