my javascript code and tinkering