Added watch function for browser resize