removing redundant window calls