added support for multiple view windows, hasnt been confirmed to work