updated getOrders operation