err not checked, but per my other comments, this function will likely be going away anyways.