migrate to glib, in progress