lint and refactor