I've looked at it again, and I honestly can't remember what I was thinking using bitwise operators... :o)