simplify common handler