made changes to validation class and usage.