add pattern stamp functionality