Added calls to functions to escape special characters