initial import for js stuff

basically working but needs some clean up
got it working for the most part

but the count is wonky if you play a second game