First working code.