added preproc_func.m