reorder deq functions: from Pierre-Edouard