patternsMatch() and finished main
toString()