added escape and unescape. fixes #1