migration to the Java 8 Stream API