Heap usage instead of stack