final calculations...looping thru each key...