Add substitution functions
Use substitution functions in LU solving