auto resizing and other enhancements