add function clear() to Pattern and write more README.md