edit leave method