First working integrated version