simplify code of PDA by reformatting rules