Added code for sub-expressions and order of operations