implement the function of new message