Made selector and iterator more efficient