add test for avg function