changing ui, correcting thread spawning