adding validator class