added optional user confirmation