Text this: A new finite difference algorithm for boundary value problems involving transmission conditions