Added basic support for all number of windows