started refactoring to apply methods