refactor to support linting