added the validation function
Merge branch 'ToroBranch'