create script.js

all js functions go here