1. added new function 'getWindow'