You want `$(uppercase(string(f)))`. Otherwise that happens every time this function is called.