support for trimming window size