Adding resizing functionality.