little more linting and refactoring