improve `license` function