Use times instead of upto with -1

It is simpler.