added part of logic to app management