normalize input data