Gaps and Overlaps functions working