dynmically determine window size on load