split js into a separate file