rewriting confirm()