use WINDOW_SIZE instead of num