moved counter sum, added hlt