fixed indentation and call method on new windows