refactored the methods
refactored some methods for the final run