add resize code