write the whole thing