Refactored some of the methods