Js refactor

fixed!!