protected function prepareStructureAndData(array $data)
    {
        // check passed input (simple)
        if (!isset($data[1]) || !isset($data[2]) || !isset($data[3])) {
            throw new Exception('Array passed to '.__METHOD__.' could not be processed!');
        }

        // extract required information
        $tag = ($data[1][0] !== '') ? $data[1][0] : null;

        if ($tag !== null) {
            $keys   = array_slice($data[2], 1);
            $values = array_slice($data[3], 1);
        } else {
            $keys   = $data[2];
            $values = $data[3];
        }

        // get result combined and keys in lower case
        $properties = array_change_key_case(array_combine($keys, $values), CASE_LOWER);

        $result = [
            'tag'        => $tag,
            'properties' => $properties,
        ];

        return $result;
    }