new interface. redesign of code. follow pep8