Feature/2341 use indexes to store and fetch keys