implemented special character escaping