cleaning validation code