Add return type to hasNext