added resize functionality