First code modernization to java 8