just adding intersect computation function