followed some pylint suggestions