Added multiprocess method as well as made distance matrix a member variable