update normalize.pl for new api