adding bfunctions.py