move JS to a separate file