updated logic for orders and provider's views