refactored again, trying out PyCharm's unit-testing