added matrix editing