fixed a few bugs and added confirmation statements