add "if" as a condition to get a square window