revise to use StdHSM
simplify method
simplify methods