should probably assert not empty here (or at least not null)