correct H function