Use new instead of allocate in mapper