change to asserting malloc