refactored to make pylint happy