added checks for orders