added leaver functionality to MDP