Added temperature and criterion as variables