Implemented exit and worked more on yield