Function findPrecedingPositions