all GUI code in same thread (trying to fix Mac issue)