Yay guys, i did it!! , i connected one leg of the button to ground as you suggested, i then connected the other leg to PORT A + a 10k resistor on this leg goes to +5v , i'm just happy:D i wrote new code, and scrapped the mikroc Button function altogether. thanks guys for your help. this is the code....