database closen in package add_transaction