implementation for maintaning average message length information