added pattern contexts