construct dict properly