Added overlapPositions and boundaryPositions functions