ui refactor working