correct the order of operation