abstract data preparation for extendability;  minor comments update