This is my first post!

I was hoping someone could help me out with a voltage comparator (LM339) that i bought yesterday. I am really excited to get it working!

Here is an image of my circuit so far (from a website)

The only difference with my circuit is that I have 333.3...Ω for R3, and am using + and - input and output 2.

My problem is that the LED seems to work as if it was attached to a potentiometer... As i crank up the pot, about half way through, the LED comes on, at roughly the right voltage. The problem is that it comes on EXTREMELY dim, and as i crank the pot higher and higher, it becomes brighter. What I was expecting was a solid 5v or 0v... The 339 seems to be varying the voltage. I don't quite understand what i've done wrong. I know i haven't burnt out the 339 because I looked back over what I did and I never had more than 16mA going through it, wich is it's max.

Thanks in advance!