used Bptotal, Bdis and other variables mike recommended