added validation and modified program view