i'm beginning to hate javascript