working code modindept