licence variable added
ignoring stuff
tried to improve licence de-duping, now looking at 'license' first, then 'license_id'