add methods to close rpc clients
merge