Implemented $and and $or.