Added appDetermine procedure.