Added matrix transformation