adding mem_free params