Slight changes in patterns and handling other types
of brackets added