moditify the stat function's interface.