checking for message duplication