found bug in calc_many_RBB (thanks to Canopy's PyFlake checking). some cleanup as well