Modified ui.hs to handle new functions