initial commit of a validator class to improve on loop logic