changed some things add confirm dialog