License for nightwatch function added