Resizing functionality added