new fomarrting for code with commas, and fixed newAttribute API call