replace the ptype instance variable