Updated for Java8