clean up the iterator api