add types, mapping to index