the line substitution solution