Updated the code -added questions