incorporating Js suggestions