made graph similarity use multiprocessing