Change to use RPC functions


