Added support for ordering results