some cleanup of this code while I am trying to debug a problem with