add new sizeToFit method for terminal resizing