refactored and removed unnecessary methods and tests