add override for hasNext and next