updating javascript formatting