refactored location of methods + added test classes