convert Malloc to new