moved avg number to CLI parameter