updating matrix examples