REV: refactor to extract handler class