changed name of 'seen' dictionary to 'parents'