refactored to generic FunctionNode, add Lower() and Upper()