added `global` keyword; renamed fmtstring()