add close connection to database