use multiprocessing to generate kls