refactoring private methods