don't use dict:append - appears to be n^2