Added GUI and better function