merged UI.cpp with main.cpp