adds dictionary for each window, fixes issue with definition lookup