formatting javascript