updated for java8