Added function to insert translation into the matrix