Add code to fetch entries from db