update hmoment function