added getwarning and sentwarning