Refactored getAll()