reformat javascript