a great auto resize approach