Working copy of Pattern and tested.

Signed-off-by: Benjamin <benchisa@gmail.com>