moved js out of index