switched from functions to classes for preprocessing algorithms