added binary test function (not working), fixed for boolean expression handling