Added weight to the HPWL function