Distribution Algorith: updating some functions in order to get all data needed to the distribution algorithm.