Using mclapply for multithreading