implemented ds using multiprocessing