new algorithm available within java 8