refactoring : extracted methods