sort dictionaries. closes #13