rp.py dispatch_fuction