gobject helper functions