create UI and it's function