built UI code. nearly done.