removed usage of anonymous class