Implemented leave operation