use cached pattern data for formatting [fix #3]