add resize functionality.