cleaned up iterator class