draft: reading messages refactoring