add tiny function header
reintroduce escaping and adjust tests