added confirm functionality