refactored to Java 8