validation loop set up