added support for active window