initial adding of working code