update matrix conversion