Resize functionality integrate width and height