removing final comma for proper JSON