Added bma code. please briverfn_BM_HS.m' to use