just a copy of HTP.py, but trying to keet naming convention consistent.