change method to react to window size changes