renamed pyfunc to callfunc.py and made logic changes