added logic to print orders for the server