node script to fix data formatting