added confirmation message and added comments