improved the overlap function by using the projections