helper script for processing bac data