added required to input as well as pattern matching for acceptable options