reorganizing gst_stack