refresh dimensions on window resize

closes #4