create UI and implement part of the function