Adding code for reading the data back from the database