added try catch
working, but not running the second 1/2 of the function
working code, added couch db stuff, but I don't think I am going to use it