fix some bugs about bv and add some comments to the script