added rpc and testing