adding Pengyifan's FH implementation