moved valid_tables to sanitize