validation and basic output