add resize
rewrote resize