updated fmt_text function, forked & updated to string_format