added all HPCA code