codes nearly done