removed one spurious cvhecking m.values().size()