Adding selection of window to use. Version 1.0