initial commit, new BMS code