redo BML in python