esper integration small refactoring