solve function now takes order of operations into account