added some documentation for the patterns