require nw.gui as parameter