oops, missed pasting the correction of allocate return function