implemented the ui