updated for jdk8
small refactorings