adding documentation fixes and changing avg to average