added auto-confirmation flag option