moved the sanitize method to a file

for reference...