created helper functions for index and lru
project complete - not tested