created message class, updated the test file and main API functionality