Add in an index, make more generic