public function first($cb=null)
    {
        if ($cb==null) {
            return $this->isNotEmpty()?$this->rows[0]:null;
        } else {
            // method returns the first element in the collection that passes 
            //a given truth test
            foreach ($this->rows as $index=>$row) {
                if ($cb($row, $index)===true) {
                    return $row;
                }
            }
        }
        return null;
    }