moved import string out of function and calls globally, should generate smaller footprint if reformat is called repeatedly