private function addingAttribute(\stdClass $obj, array $elements, int $dataKey)
    {
        foreach ($elements as $name => $value) {
            try {
                $obj->$name = is_callable($value) ? $value($this->rawData[$dataKey]) : $value;
            } catch (\Exception $ex) {
                throw new \Exception("Could not process attribute {$name}");
            }
        }
        return $obj;
    }