distsolutions code corrected