main script without storageMgr, new logic