added sanitization checking