first implmentations of db actions
added function decorator to handle exception handling