changed logic of scan manager