removed duplicate code. BANE updated to include smart use of arbitary number of cores