implemented ttl index
added unit test for expire index