putting into functions, best practices, pylint