remove comma at the end since its last element.