use pointers in countercalc function
split long vnstat main into smaller functions