- added try catch, close connection to project functions