Added intersect and lookup functions.