added multicore support for cpu usage