refactoring some methods to extensions methods
refactoring