working code insert