Replaced cobra_functions by stats.