refactor getAll & getOne