I found out that when I connect a wire to digital input 2, a HIGH value is registered, even when the wire is not connected to anything.
allright thanks,however I am wandering whether I stated the problem right: when I connect one end of a jumper cable to the output the digitalRead value changes. it changes back when i disconnect it. The other end of the cable is not connected at to anything. It seems i'm using a loose wire as a button. anyway thanks for the advice, I'll look it up.cheers