Added SendMessage code