Updated SendMsg method