restore order of operations