added function appDiag