creating lists (of types) and docs only inside those types (doc.type instead of doc.data.type)