moved js to file