improve Overleap function