improved the query pulling all orders