moved js to external file