added allocate array and reallocate array to program. Further created
node functions.