moved js script to seperate file.