Added isBM function