implemented a window size feature