added option: onDelete