renamed bms function