split out js into separate file