fixes to pattern matcher
documented bitwise operators