refactored splicing. significantally more efficient.