creating and populating an array