Started implementing saving of the distribution