changed message formatting, added tests