javascript is weird, but I'm pretty sure it works now.