add preproccess functions