adding functionality to delete messages