added node support. Different API usage because we have to provide a window and I didnt want to break backwards compatibility