create the process function for surveydata