added basic windowing support