This is your oooonly anonymous function in the whole plugin. Does it make sense to move this to a separate method?