improving doc ordering