removed unused imports
added statistics for message size and nr