update EP.py and fix subcontent func