adding first version of minmax.pl