add pattern validation due to issue #2