adding working code init