frequency and sum finished