refactoring #5
refactoring #6
refactoring #7