Pm rewrite