update js to stop printing the same message over and over