finished refactoring submethods