optimize for resizing, continued