finished function-leavemsg