Allocation function now initializes value