change var from static to dynamic in Stat