edited normalize script