converted a few anonymous classes to java 8 lambdas.