pre-process