Add function for overlap testing.