Made simple version to calculate intersection.