updated for jdk8