added matrix (jpeg to jpg)