Reading and writing to DB working - need to expand out
to represent the old database interaction