AND OR logic support added

AND logic is handled by the and function.
Same for OR logic.