Code for HPSC project