change memory code a bit