moved js to external source file