refactored some of the methods