refactored message_too_long business logic