added resizing of terminal