This needs documentation now that it is more complicated.