Updating Matrix