Used eachWithIndex
Implemented delete application