jdk8 improved, remove some more code