stat_function added