implemented js->py rpc