reordered the geometry pipeline a bit