refactoring property to method