adds resize functionality