minor comments addedd