some changes for account scanning algo