remove unnecessary comma at end of sample arrays