simplification in substitution and function evaluation