Added double strand support to modular-scale function