public function format($tags, $type)
    {
        $formattedTags = array();
        if ($type === 'user'){
            $formattedTags['tags'] = array();
            foreach($tags as $tag){
                $formattedTags['tags'][$tag['_id']] = array(
                    'mode' => 'readWrite'
                );
            }
        } else if ($type === 'other'){
            foreach($tags as $tag){
                $formattedTags['tags'][] = $tag['_id'];
            }
        } else {
            throw ErrorException("Only 'user' and 'other' are allowed types");
        }

        return $formattedTags;
    }