new divide algorithm and bugfix by addition
Some experiments with java 8