simplified algorithm for intercalate