implemented minimum window size