tiny formatting and refactoring