loop to get multiple RPC calls