Add discussed changes expect malloc.