added deleteMessage function