upgrtaded pycomp to return JSON and removed py_wrapper