Refactored in order to be in line with pep8