freaking dumb javascript