better syntax of keep dictionary order