made isotropic and ard version of HSM implementation