Changed to dynamic array and free memory assigned to array once finished