added message direction field