updated BAC calculations and fixed up some other bugs