adding first version of reverse.pl