refactoring reference object