included BAC calculations and introduced functions'