last element in an array should have a comma at the end