adding update to db functions