animation works for resizing