updating some changes/corrections to the data organization code