reimplementing resize on mobile