updated order of operation