Added dynamic window size