code added for creating dmg