implement the UI