input substitution