update memory