new working code added