threeHDP code added