function valid()
 {
     if (!parent::valid()) {
         return false;
     }
     return call_user_func_array($this->predicate, array(parent::current(), $this->index));
 }
 public function rewind()
 {
     parent::rewind();
     //need to loop until first match
     $this->movetonextmatch();
 }