local classes and methods in closure methods