Refactor to java8 streams