update preprocess

class preprocess functions