improvements to formatting and pattern text