adds top level $and + $or tests
adds nested $and + $or tests