marked areas where Java 8 could simplify the code #43