improve ghsha function