having issues with array initialization