correct dict saving