leave message function update