refactoring of ppm controller