Prepared kernel for multi threading