helper for index updating