Added leave code