added multicore support