adopted for GTK