refactored, added new methods