added logger and sanitization