Final version of CmpMngr.java by ziyi zhang