Added resize functionality