adopt java 8 lambda expressions