Changed window variable to enable omiting the argument.