Added pattern matching to optional req