update examples

added pattern example