cleanup and sanitization