trying to use java 8 functional features for next tasks