Java8-ify code