updated according to most recent gui lib