added more UI code