improvements to the overlap function