modified gui and fixed ShowMatrix