adding ui for pattern matching