use allocate instead new