change mem init method.