added deletemessage functionality