wrote dToB.py file