middleware added, rpc call now working