added PopOrder variable