optimize GUI