resetting index