fix #7 the avg