refactoring
implements getAll