AI works! Failed code extensively modified and applied successfully