added shutdown hook to close connection to the database