A working code