updated to use new main.py parameter format
extract bigquery functions into bqi module