fix raw code to function call