adding a dict exercise from LPTHW