did some PEP rework