modified appManager.js