changed required_pattern_length to 5