moving all the GL stuff to a central place