refactor custom index to slice
remove unused field
use time.Duration instead of int64