refactoring http event processor