Validated input of prompts

added validation to inputs