updating formatting to js