declare loop and ht packages