fix show patten count and regex validation, and refac classes
clean up