removed extern "C" section, just apply to f()