moved js into separate page