Use lambda in provide_rpc!