updated cg2ex1 to new slicing API