first version of reverse.pl