rewrote ui stuff to be better