added example validation code