update documentation; ensure substitute works with non-string values