Try changing your "test" variable to a byte. Then don't bother with the serial qualifier, just jump right to the data input, and do a compare.

-----------------PICSTER--------------