refactor; add wrapper to defineAnonymousClass