update confirm to use non deprecated code