Added new variables to order loop