simplify escape handling