generalizes zwietering pre-processing functions