- encapsulated the logic in getting all entries.