Js working in separate file