changed some mem stuff