purifying user inputs