define window if not defined