merged to latest BAT