add set_pattern method