Setting up rpc