Use java streams instead of iteration