now only needed ammount of memory is allocated for functionStatistic