normalize function filled in