client.py: --avg flag added