improve unit test for $not
implement $and
implement $or
implement $nor
implement $mod