add the hp set function