rework the helper code to be much more GL-centric