eliminate global GROUP_ALL

use lazy evaluation