removing brackets and fixing commas