fixed bug in the creation of the second dict