adding classes for message and message segment
updating injectErrors fn to work w/ Message class