change to pass msg via json