removed order_variable and fixed failed_attempts