interim build -- trying to fix while loop