- refactoring some glw code