glad: improve data structure