made window size dynamic