resolves #7, refactored messages into two classes