separating mapping and indexing