now also works with Intmax not only Intmax-1
and a little bit more testing