starting to modularize data processing