first prompt and invalid input loop functions created