I've moved the vars which could be declared inside the confirm, so now it's more clear.