refactored, linted