matrix version of bmh