modify deprecated confirm hook