preproc function added