moved js to external files