lol js to the rescue for all the terrible hacks i have wrought.