reorder the order of operation in checkout