refactor getter