Pass lists by-reference instead of by-value
PEMDAS now works if original query written in PEMDAS order