refactoring => remove duplication