escape.map: partly optimized and polished