remove the trailing commas