change this to UI in functions in UI