passing the window instead of the netmanager gives more flexibility