[Level_1]added validation method to validate program output