getEntries function working