Matrix Update

Updated Matrix Code.