third problem solved + tests refactored