modified hdi JS