added message class and tests