working code restored