refactorization of the controlpanel helper